home *** CD-ROM | disk | FTP | other *** search
/ CSi Master: Ableton Live 5 / CSi Master: Ableton Live 5.iso / pc / rsrc / locrsrc / mtprsrc.dir / Internal_3_checkForCD.ls < prev    next >
Encoding:
Text File  |  2005-10-31  |  14.3 KB  |  290 lines

  1. on checkForCD vTestPath
  2.   global gMovieBasePath, gPicName
  3.   case the machineType of
  4.     256:
  5.       if vTestPath = "CSi_vol1:CSiFiles:IMCD" then
  6.         vTestPath = "CSi_vol1:CSiFiles:Imcd1_al.ias"
  7.       end if
  8.       vTestPathPC = vTestPath
  9.       vDelimiterSave = the itemDelimiter
  10.       the itemDelimiter = ":"
  11.       vTestPathPC = the last item in vTestPath
  12.       the itemDelimiter = vDelimiterSave
  13.   end case
  14.   case the machineType of
  15.     256:
  16.       Drive = "EMPTY"
  17.       Drive = baFindDrive("d", "IMCD")
  18.       if Drive <> "EMPTY" then
  19.         Drive = Drive & ":\"
  20.         objectFile = new(xtra("fileIO"))
  21.         openFile(objectFile, Drive & vTestPathPC, 1)
  22.         if status(objectFile) = 0 then
  23.           if gPicName = "CSI_V3.PCT" then
  24.             vCoreysResult = readFile(objectFile)
  25.             vCoreysResult = line 1 of vCoreysResult
  26.             vSSaveDaDelimiter = the itemDelimiter
  27.             the itemDelimiter = ":"
  28.             if item 1 of vCoreysResult = "CSi vol.3" then
  29.               gMovieBasePath = Drive & "content\movie\"
  30.               vResult = 1
  31.               closeFile(objectFile)
  32.             end if
  33.           else
  34.             if gPicName = "CSI_V4.PCT" then
  35.               vCoreysResult = readFile(objectFile)
  36.               vCoreysResult = line 1 of vCoreysResult
  37.               vSSaveDaDelimiter = the itemDelimiter
  38.               the itemDelimiter = ":"
  39.               if item 1 of vCoreysResult = "CSi vol.4" then
  40.                 gMovieBasePath = Drive & "content\ie\"
  41.                 vResult = 1
  42.                 closeFile(objectFile)
  43.               end if
  44.             else
  45.               if gPicName = "CSI_V5.PCT" then
  46.                 vCoreysResult = readFile(objectFile)
  47.                 vCoreysResult = line 1 of vCoreysResult
  48.                 vSSaveDaDelimiter = the itemDelimiter
  49.                 the itemDelimiter = ":"
  50.                 if item 1 of vCoreysResult = "CSi vol.5" then
  51.                   gMovieBasePath = Drive & "content\ie\"
  52.                   vResult = 1
  53.                   closeFile(objectFile)
  54.                 end if
  55.               else
  56.                 if gPicName = "CSI_V6.PCT" then
  57.                   vCoreysResult = readFile(objectFile)
  58.                   vCoreysResult = line 1 of vCoreysResult
  59.                   vSSaveDaDelimiter = the itemDelimiter
  60.                   the itemDelimiter = ":"
  61.                   if item 1 of vCoreysResult = "CSi vol.6" then
  62.                     gMovieBasePath = Drive & "content\ie\"
  63.                     vResult = 1
  64.                     closeFile(objectFile)
  65.                   end if
  66.                 else
  67.                   if gPicName = "CSI_V7.PCT" then
  68.                     vCoreysResult = readFile(objectFile)
  69.                     vCoreysResult = line 1 of vCoreysResult
  70.                     vSSaveDaDelimiter = the itemDelimiter
  71.                     the itemDelimiter = ":"
  72.                     if item 1 of vCoreysResult = "CSi vol.7" then
  73.                       gMovieBasePath = Drive & "content\ie\"
  74.                       vResult = 1
  75.                       closeFile(objectFile)
  76.                     end if
  77.                   else
  78.                     if gPicName = "MT_PI.PCT" then
  79.                       vCoreysResult = readFile(objectFile)
  80.                       vCoreysResult = line 1 of vCoreysResult
  81.                       vSSaveDaDelimiter = the itemDelimiter
  82.                       the itemDelimiter = ":"
  83.                       if item 1 of vCoreysResult = "CSi MT Plug-Ins" then
  84.                         gMovieBasePath = Drive & "content\ie\"
  85.                         vResult = 1
  86.                         closeFile(objectFile)
  87.                       end if
  88.                     else
  89.                       if gPicName = "CSi_ST1.PCT" then
  90.                         vCoreysResult = readFile(objectFile)
  91.                         vCoreysResult = line 1 of vCoreysResult
  92.                         vSSaveDaDelimiter = the itemDelimiter
  93.                         the itemDelimiter = ":"
  94.                         if item 1 of vCoreysResult = "CSi ST1" then
  95.                           gMovieBasePath = Drive & "content\ie\"
  96.                           vResult = 1
  97.                           closeFile(objectFile)
  98.                         end if
  99.                       else
  100.                         if gPicName = "CSI_V8.PCT" then
  101.                           vCoreysResult = readFile(objectFile)
  102.                           vCoreysResult = line 1 of vCoreysResult
  103.                           vSSaveDaDelimiter = the itemDelimiter
  104.                           the itemDelimiter = ":"
  105.                           if item 1 of vCoreysResult = "CSi vol.8" then
  106.                             gMovieBasePath = Drive & "content\ie\"
  107.                             vResult = 1
  108.                             closeFile(objectFile)
  109.                           end if
  110.                         else
  111.                           if gPicName = "CSI_M1.PCT" then
  112.                             vCoreysResult = readFile(objectFile)
  113.                             vCoreysResult = line 1 of vCoreysResult
  114.                             vSSaveDaDelimiter = the itemDelimiter
  115.                             the itemDelimiter = ":"
  116.                             if item 1 of vCoreysResult = "DP4 CSi MASTER" then
  117.                               gMovieBasePath = Drive & "content\ie\"
  118.                               vResult = 1
  119.                               closeFile(objectFile)
  120.                             end if
  121.                           else
  122.                             if gPicName = "CSI_V10.PCT" then
  123.                               vCoreysResult = readFile(objectFile)
  124.                               vCoreysResult = line 1 of vCoreysResult
  125.                               vSSaveDaDelimiter = the itemDelimiter
  126.                               the itemDelimiter = ":"
  127.                               if item 1 of vCoreysResult = "CSi vol.10" then
  128.                                 gMovieBasePath = Drive & "content\ie\"
  129.                                 vResult = 1
  130.                                 closeFile(objectFile)
  131.                               end if
  132.                             else
  133.                               if gPicName = "CSI_M2.PCT" then
  134.                                 vCoreysResult = readFile(objectFile)
  135.                                 vCoreysResult = line 1 of vCoreysResult
  136.                                 vSSaveDaDelimiter = the itemDelimiter
  137.                                 the itemDelimiter = ":"
  138.                                 if item 1 of vCoreysResult = "Waves CSi MASTER" then
  139.                                   gMovieBasePath = Drive & "content\ie\"
  140.                                   vResult = 1
  141.                                   closeFile(objectFile)
  142.                                 end if
  143.                               else
  144.                                 if gPicName = "CSI_S2.PCT" then
  145.                                   vCoreysResult = readFile(objectFile)
  146.                                   vCoreysResult = line 1 of vCoreysResult
  147.                                   vSSaveDaDelimiter = the itemDelimiter
  148.                                   the itemDelimiter = ":"
  149.                                   if item 1 of vCoreysResult = "SONAR 3 CSi STARTER" then
  150.                                     gMovieBasePath = Drive & "content\ie\"
  151.                                     vResult = 1
  152.                                     closeFile(objectFile)
  153.                                   end if
  154.                                 else
  155.                                   if gPicName = "CSI_M3.PCT" then
  156.                                     vCoreysResult = readFile(objectFile)
  157.                                     vCoreysResult = line 1 of vCoreysResult
  158.                                     vSSaveDaDelimiter = the itemDelimiter
  159.                                     the itemDelimiter = ":"
  160.                                     if item 1 of vCoreysResult = "Reason CSi MASTER" then
  161.                                       gMovieBasePath = Drive & "content\ie\"
  162.                                       vResult = 1
  163.                                       closeFile(objectFile)
  164.                                     end if
  165.                                   else
  166.                                     if gPicName = "CSI_S3.PCT" then
  167.                                       vCoreysResult = readFile(objectFile)
  168.                                       vCoreysResult = line 1 of vCoreysResult
  169.                                       vSSaveDaDelimiter = the itemDelimiter
  170.                                       the itemDelimiter = ":"
  171.                                       if item 1 of vCoreysResult = "CubaseSX2 CSi STARTER" then
  172.                                         gMovieBasePath = Drive & "content\ie\"
  173.                                         vResult = 1
  174.                                         closeFile(objectFile)
  175.                                       end if
  176.                                     else
  177.                                       if gPicName = "CSI_S04.PCT" then
  178.                                         vCoreysResult = readFile(objectFile)
  179.                                         vCoreysResult = line 1 of vCoreysResult
  180.                                         vSSaveDaDelimiter = the itemDelimiter
  181.                                         the itemDelimiter = ":"
  182.                                         if item 1 of vCoreysResult = "Logic CSi STARTER" then
  183.                                           gMovieBasePath = Drive & "content\ie\"
  184.                                           vResult = 1
  185.                                           closeFile(objectFile)
  186.                                         end if
  187.                                       else
  188.                                         if gPicName = "CSI_S05.PCT" then
  189.                                           vCoreysResult = readFile(objectFile)
  190.                                           vCoreysResult = line 1 of vCoreysResult
  191.                                           vSSaveDaDelimiter = the itemDelimiter
  192.                                           the itemDelimiter = ":"
  193.                                           if item 1 of vCoreysResult = "DP4 CSi STARTER" then
  194.                                             gMovieBasePath = Drive & "content\ie\"
  195.                                             vResult = 1
  196.                                             closeFile(objectFile)
  197.                                           end if
  198.                                         else
  199.                                           if gPicName = "CSI_S06.PCT" then
  200.                                             vCoreysResult = readFile(objectFile)
  201.                                             vCoreysResult = line 1 of vCoreysResult
  202.                                             vSSaveDaDelimiter = the itemDelimiter
  203.                                             the itemDelimiter = ":"
  204.                                             if item 1 of vCoreysResult = "Reason CSi STARTER" then
  205.                                               gMovieBasePath = Drive & "content\ie\"
  206.                                               vResult = 1
  207.                                               closeFile(objectFile)
  208.                                             end if
  209.                                           else
  210.                                             if gPicName = "CSI_M11.PCT" then
  211.                                               vCoreysResult = readFile(objectFile)
  212.                                               vCoreysResult = line 1 of vCoreysResult
  213.                                               vSSaveDaDelimiter = the itemDelimiter
  214.                                               the itemDelimiter = ":"
  215.                                               if item 1 of vCoreysResult = "Live 5 CSi MASTER" then
  216.                                                 gMovieBasePath = Drive & "content\ie\"
  217.                                                 vResult = 1
  218.                                                 closeFile(objectFile)
  219.                                               end if
  220.                                             else
  221.                                               if gPicName = "CSI_M04.PCT" then
  222.                                                 vCoreysResult = readFile(objectFile)
  223.                                                 vCoreysResult = line 1 of vCoreysResult
  224.                                                 vSSaveDaDelimiter = the itemDelimiter
  225.                                                 the itemDelimiter = ":"
  226.                                                 if item 1 of vCoreysResult = "Nuendo CSi MASTER" then
  227.                                                   gMovieBasePath = Drive & "content\ie\"
  228.                                                   vResult = 1
  229.                                                   closeFile(objectFile)
  230.                                                 end if
  231.                                               else
  232.                                                 gMovieBasePath = Drive
  233.                                                 vResult = 1
  234.                                                 closeFile(objectFile)
  235.                                               end if
  236.                                             end if
  237.                                           end if
  238.                                         end if
  239.                                       end if
  240.                                     end if
  241.                                   end if
  242.                                 end if
  243.                               end if
  244.                             end if
  245.                           end if
  246.                         end if
  247.                       end if
  248.                     end if
  249.                   end if
  250.                 end if
  251.               end if
  252.             end if
  253.           end if
  254.         end if
  255.         objectFile = 0
  256.       end if
  257.       if vResult <> 1 then
  258.         the itemDelimiter = ":"
  259.         vCDName = item 1 of vTestPath
  260.         vResult = vCDName
  261.       end if
  262.       return vResult
  263.     otherwise:
  264.       testFile = new(xtra("fileIO"))
  265.       openFile(testFile, vTestPath, 1)
  266.       if status(testFile) = 0 then
  267.         vResult = 1
  268.       else
  269.         if vTestPath = "CSi_vol1:CSiFiles:IMCD" then
  270.           vTestPath = "CSi_vol1:CSiFiles:IMCD1"
  271.           testFile2 = new(xtra("fileIO"))
  272.           openFile(testFile2, vTestPath, 1)
  273.           if status(testFile2) = 0 then
  274.             vResult = 1
  275.           end if
  276.           closeFile(testFile2)
  277.           testFile2 = 0
  278.         end if
  279.       end if
  280.       closeFile(testFile)
  281.       testFile = 0
  282.       if vResult <> 1 then
  283.         the itemDelimiter = ":"
  284.         vCDName = item 1 of vTestPath
  285.         vResult = vCDName
  286.       end if
  287.       return vResult
  288.   end case
  289. end
  290.